package com.lq.learningTest.duoxiancheng;

public class AtomicTest {
    public static volatile int count = 0;
    public static void main(String[] args) {
        for (int i = 0; i < 100000; i++) {
            new Thread(()->{
                try {
                    Thread.sleep(3000);
                } catch (InterruptedException e) {
                    throw new RuntimeException(e);
                }
                count++;
            }).start();
        }


        System.out.println(count);
    }
}
